<!DOCTYPE html><html><head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
	<title>支付信息</title>
	<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto.js" charset="utf-8"></script>	
	<link href="<?php echo TEMPLATE_SITE_URL;?>/css/common.css" rel="stylesheet" type="text/css">
	<link href="<?php echo TEMPLATE_SITE_URL;?>/css/paypasswd.css" rel="stylesheet" type="text/css">
	
</head>

<body>
<div id="contentbox" style="min-height: 576px;">
    <div class="setPasswordMain">
        <div class="title">输入您的安全支付密码（6位数字）</div>
        <div class="userinfoMain">
            <div class="userinfoItem">
                <span>支付密码</span>
                <input name="paypasswd" value="" placeholder="支付密码" type="password">
            </div>
            <div class="userinfoItem">支付密码用于余额支付</div>
        </div>
        <div class="title">认真填写以下信息，用于找回支付密码</div>
        <div class="userinfoMain">
            <div class="userinfoItem">
                <span>姓名</span>
                <input name="cardname" value="" placeholder="填写真实姓名">
            </div>
            <div class="userinfoItem">
                <span>身份证号</span>
                <input name="cardid" value="" placeholder="填写身份证号">
            </div>            
            <div class="userinfoItem"><p id="tips" style="color:red;"></p>
            </div>
        </div>
        <input type="hidden" name="ref_url" value="<?php echo $output['ref_url'];?>">
        
        <button class="submit">确 认</button>
    </div>
</div>

<script type="text/javascript">
$(function(){
	
	
	$('.submit').click(function(){
		var reg = new RegExp(/^\d{6}$/);
		var paypasswd = $('input[name=paypasswd]').val();
		var cardname = $('input[name=cardname]').val();
		var cardid = $('input[name=cardid]').val();

		if(!reg.test(paypasswd)){
			$('#tips').html('请填写6位有效数字');		
			return false;
		}


		
		$.ajax({
			type:'post',
			url:'index.php?act=payment&op=kaitong',
			data:{paypasswd:paypasswd,cardname:cardname,cardid:cardid},
			dataType:'json',
			success:function(data){
				if(data.state){
					var url = $('input[name=ref_url]').val();
					location.href = url;
				}
			}
		});
	});
});
</script>

<?php include template('home/nav');?>
</body></html>